package com.interest.plus2.net;



import com.interest.plus2.bean.BaseBean;
import ohos.data.distributed.common.UserInfo;
import retrofit2.Call;

import java.util.ArrayList;


/**
 * 网络请求
 */
public class MobileApi  {

    private MobileApiInterface mobileApiInterface;

    private MobileApi() {
        mobileApiInterface = RetrofitUtil.getInstance().create(MobileApiInterface.class);
    }

    public static MobileApi getInstance() {
        return SingletonHolder.INSTANCE;
    }

    private static class SingletonHolder {
        public static MobileApi INSTANCE = new MobileApi();
    }

    /**
     * 获取消息
     */
    public Call<BaseBean> communal4_tabAd(String code, int location) {
        return mobileApiInterface.getnotice(code, location);
    }

    /**
     * 登录
     */
    public Call<BaseBean<UserInfo>> communal4_tabAdOnly(UserInfo userInfo) {
        return  mobileApiInterface.login(userInfo);
    }


}
